package icu.zqyhdm.blog.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import icu.zqyhdm.blog.entity.Comment;
import icu.zqyhdm.blog.vo.CommentListVo;
import icu.zqyhdm.blog.vo.CommentUploadVo;
import icu.zqyhdm.blog.vo.CommentVo;
import icu.zqyhdm.blog.vo.ReplyVo;

import java.util.List;

/**
 * @Description
 * @Author lifu
 * @Date 2021/6/22 21:17
 */
public interface CommentService extends IService<Comment> {

    List<CommentVo> listAll();

    CommentListVo list(Integer articleId, Integer current, Integer limit);

    void saveComment(String token, CommentUploadVo commentUploadVo);

    // 删除文章时删除对应的评论
    void deleteCommentByArticleId(Integer articleId);

    // 查询评论下的回复
    List<ReplyVo> listRepliesByCommentId(Integer articleId,Integer commentId,Integer current, Integer limit);

    void likeComment(String token, Integer articleId, Integer commentId);
}
